package com.book.dao;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
@Repository
public class OrderItemsDao {
	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	public void saveItems(Integer bookId, Integer orderId){
		String sql = "insert into t_orderitems values (S_ORDERITEMS_ID.nextval,?,?,?)";
		jdbcTemplate.update(sql, orderId, bookId, new Date());
			
	}
}
